package com.wjh.mirna.controller;

import com.wjh.mirna.http.Response;
import com.wjh.mirna.model.Disease;
import com.wjh.mirna.service.impl.DiseaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/disease")
public class DiseaseController {
    @Autowired
    DiseaseServiceImpl diseaseService;
    @GetMapping("/queryDisease")
    public Response queryDisease(){
        List<Disease> diseases = diseaseService.selectDisease();
        return Response.ok(diseases);
    }
}
